<template>
	<view class="page">

	</view>
</template>

<script>
	import * as NewsApi from '@/api/news.js';
	export default {
		data() {
			return {
				page: 1,
				list: []
			}
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.page++
			this.getList()
		},
		methods: {
			getList() {
				let that = this;
				NewsApi.list({
					page: this.page
				}).then(res => {
					this.list = this.list.concat(res.info)
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.page {
		padding: 20rpx;
	}
</style>